//引入封装好的请求方式
import { get, post } from "./index.js"
//处理接口  对要请求的接口进行处理


                        //菜单管理
//菜单添加
export const getmenuadd = (data)=>post("/menuadd",data)
//菜单列表
export const getmenulist = ()=>get("/menulist?istree=true")
//菜单获取(一条)
export const getmenuinfo = (data)=>get("/menuinfo",data)
//菜单修改
export const menuedit = (data)=>post("/menuedit",data)
//菜单删除
export const delMenudelete = (data)=>post("/menudelete",data)

                        //角色管理
//角色添加
export const getroleadd = (data)=>post("/roleadd",data)
//角色列表
export const getrolelist = ()=>get("/rolelist")
//角色获取
export const getroleinfo = (data)=>get("/roleinfo",data)
//角色修改
export const roleedit = (data)=>post("/roleedit",data)
//角色删除
export const delroledelete = (data)=>post("/roledelete",data)

                        //管理员管理
//添加
export const useradd = (data)=>post('/useradd',data)
//管理员总数  用于分页
export const usercount = ()=>get('/usercount')
//管理员列表
export const userlist = (data)=>get('/userlist',data)
//管理员获取  一条
export const userinfo = (data)=>get('/userinfo',data)
//管理员修改
export const useredit = (data)=>post('/useredit',data)
//管理员删除
export const userdelete = (data)=>post('/userdelete',data)
//管理员登录
export const userlogin = (data)=>post('/userlogin',data)


                        //商品分类管理
//添加
export const setCateadd = (data)=>post('/cateadd',data,true)
//列表
export const getCatelist = (data)=>get('/catelist?istree=true',data)
//获取 一条
export const getOcateinfo = (data)=>get('/cateinfo',data)
//修改
export const updataCateedit = (data)=>post('/cateedit',data,true)
//删除
export const delCatedelete = (data)=>post('/catedelete',data)


                        //商品规格
//商品规格添加
export const specsadd = (data)=>post('/specsadd',data)
//商品规格总数  用于计算分页
export const specscount = ()=>get('/specscount')
//商品规格列表  用来分页
export const specslist = (data)=>get('/specslist',data)
//商品规格获取  一条
export const specsinfo = (data)=>get('/specsinfo',data)
//商品规格修改
export const specsedit = (data)=>post('/specsedit',data)
//商品规格删除
export const specsdelete = (data)=>post('/specsdelete',data)


                        //商品管理
//商品添加
export const goodsadd = (data)=>post('/goodsadd',data,true)
//商品总数   用于计算分页
export const goodscount = ()=>get('/goodscount')
//商品分页
export const goodslist = (data)=>get('/goodslist',data)
//商品获取   一条
export const goodsinfo = (data)=>get('/goodsinfo',data)
//商品修改
export const goodsedit = (data)=>post('/goodsedit',data,true)
//商品删除
export const goodsdelete = (data)=>post('/goodsdelete',data)


                        // 轮播图管理
//轮播图添加
export const banneradd = (data)=>post("/banneradd",data,true)
//轮播图列表
export const bannerlist = ()=>get("/bannerlist")
//轮播图获取 一条
export const bannerinfo = (data)=>get("/bannerinfo",data)
//轮播图修改
export const banneredit = (data)=>post("/banneredit",data,true)
//轮播图删除
export const bannerdelete = (data)=>post("/bannerdelete",data)


                            //会员管理
//会员列表
export const memberlist = ()=>get("/memberlist")
//会员获取  一条
export const memberinfo = (data)=>get("/memberinfo",data)
//会员修改
export const memberedit = (data)=>post("/memberedit",data)


                            //限时秒杀管理
//限时秒杀添加
export const seckadd = (data)=>post("/seckadd",data)
//限时秒杀列表
export const secklist = ()=>get("/secklist")
//限时秒杀 获取  一条
export const seckinfo = (data)=>get("/seckinfo",data)
//限时秒杀修改
export const seckedit = (data)=>post("/seckedit",data)
//限时秒杀删除
export const seckdelete = (data)=>post("/seckdelete",data)